<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateGridImgTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('grid_img', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('grid_id')->default(0)->comment('网格id');
            $table->integer('villager_id')->default(0)->comment('村民id');
            $table->integer('type')->default(0)->comment('类型type1:户口本2土地证3房产证4其他证明5签约6腾房7建房手续8无任何证明');
            $table->string('imgs')->default('')->comment('照片');
            $table->string('num')->default('')->comment('编号');
            $table->integer('do_user_id')->default(0)->comment('操作者id');
            $table->timestamps();
            $table->softDeletes();
        });
        \Illuminate\Support\Facades\DB::statement("ALTER TABLE `grid_img` comment '网格关联图片表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('grid_img');
    }
}
